<template>
	<view class="records-item">
		<view class="top">
			<text class="name">{{item.name}}</text>
			<text class="time">{{item.create_time}}</text>
		</view>
		<view class="top">
			<text class="name">{{item.note}}</text>
		</view>
		<view class="other">
			<text class="NO">订单号:{{item.trade_no}}</text>
			<text class="add-money" v-if="item.trade_fee_type==1">+{{item.fee}}</text>
			<text class="sub-money" v-else>-{{item.fee}}</text>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps({
		item: {
			type: Object,
			default: () => { //定义默认值
				return []
			}
		},
	})
</script>

<style lang="scss">
	.records-item {
		padding: $margin-24 0;
		border-bottom: 1rpx solid mix($white-color, $border-color, 35%);

		&:last-child {
			border-bottom: none;
		}

		.top,
		.other {
			@include f-between;
		}

		.name {
			color: $main-color;
			font-weight: 500;
		}

		.time,
		.NO {
			font-size: $font-24;
			color: $tips-color;
		}

		.other {
			margin-top: $margin-12;

			.add-money {
				font-size: $font-36;
				color: $error-color;
				font-weight: bold;
			}

			.sub-money {
				font-size: $font-36;
				color: $success-color;
				font-weight: bold;
			}
		}
	}
</style>